# Gather Prometheus Data¶
### Use ECCC Datamart to grab model data¶
[11]:
# Necessary imports
import pandas as pd
import geopandas as gpd
import folium
import numpy as np
import matplotlib.pyplot as plt
import streamlit as st
from streamlit_folium import st_folium
from shapely.geometry import Polygon
from shapely.geometry import shape
[12]:
# run the etl_nfdf_polygons.py script to get the NFDF polygons
%run etl_nfdb_polygons.py
Shapefile already exists. Downloading the latest data...
[ ]:
# load the goejson file with the NFDB polygons
polygons = gpd.read_file('Canada_perimeters.geojson')
# drop a coupole columns that are not needed
perimeters = polygons.drop(columns=['FIRSTDATE', 'LASTDATE', 'CONSIS_ID'])
# initialize a folium map
m = folium.Map(location=[52, -120],
zoom_start=4,
tiles='OpenStreetMap',
width='800px', height='600px')
# call the for clickable coordinates
from map_funcs import get_coordinates
# add the polygons to the map
folium.GeoJson(
perimeters,
name='NFDB Polygons',
style_function=lambda x: {
'fillColor': 'orange',
'color': 'red',
'weight': 1,
'fillOpacity': 0.6
}
).add_to(m)
# display the layer switcher widget
folium.LayerControl().add_to(m)
print("Please Click on your location on the coordinates of your choice to generate a coordinate pair:")
m
Please Click on your location on the coordinates of your choice to generate a coordinate pair:
Make this Notebook Trusted to load map: File -> Trust Notebook